<%@page import="com.zkingsoft.constance.SystemConstance"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://www.zkingsoft.com" prefix="matrix"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/plugin/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/MBase.js"></script>
<style type="text/css">
.breadcrumb{
	padding: 8px 15px;
    margin-bottom: 20px;
    list-style: none;
    background-color: #f5f5f5;
    border-radius: 4px;
}
.hot_news{
	background:url(http://www.canon.com.cn/common/img/line_3.gif) repeat-x left bottom;
	overflow:hidden;
	padding:31px 0 21px;
	zoom:1;
	width: 50%;
    float: left;
}
.hot_news a{text-decoration:none;}
.hot_news a em,.hot_news a strong,.hot_news a span,.hot_news a img{
	display:block;
	text-decoration:none;
}
.hot_news a h3{color:#000;font:normal 20px/24px Arial, Helvetica, SimHei; padding:0 0 16px 0;}
.hot_news a em{color:#666;font:16px/20px Arial, Helvetica, SimHei;}
.hot_news a img{float:left;padding:0px 10px 0 0;}
.hot_news a span{color:#666;font:13px/16px Arial, Helvetica, SimSun;word-wrap:break-word;word-break:break-all;}
.hot_news a em.more{color:#bf2318;font:13px/16px Arial, Helvetica, SimHei;padding-top:5px;}
.hot_news a:hover em.more{text-decoration:underline;}

</style>
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<!-- 搜索框部分start -->
		<matrix:btn value="newsNotice:search">
			<div class="ibox-content radius-5 mt-5 mpanel">
				<div style="margin-bottom: 10px;">
					<ol class="breadcrumb">
						<li><a href="../welcome">首页</a></li>
						<li class="active">公告</li>
					</ol>
				</div>
				<div class="container" style="width: 100%;" id="newsList">
<!-- 					<ul class="list-group" id="newsList"> -->
<!-- 						<li class="list-group-item b-border"> -->
<!-- 							<a href="javascript:void(0);" onclick="openDetail(6)"> -->
<!-- 								<span>市场运行概况（截止2017年3月31日）</span> -->
<!-- 							</a><span class="badge">2017-05-05&nbsp;09:05</span>  -->
<!-- 						</li> -->
<!-- 					</ul> -->
				</div>
			</div>
		</matrix:btn>

	</div>
	<script type="text/javascript"
		src="${path }/resource/js/systools/MJsBase.js"></script>
	<script type="text/javascript">
		var myGrid;
		
		$(function() {
			var html = "";
			$.ajax({
				url : '${path}/admin/webArticle/getNewsListByType',
				type : 'POST',
				data : {
					typeId : "<%=SystemConstance.ART_TYPE_NOTICE%>"
				},
				dataType : 'json',
				async : false,
				success : function(res) {
					var dataList = res.rows;
					$.each(dataList, function(i) {
// 						html += '<li class="list-group-item b-border">'
// 			 				 + '<a href="javascript:void(0);" onclick="openDetail('+dataList[i].artId+')"><span>'+dataList[i].artTitle
// 			 				 + '</span></a>'
// 			 				 + '<span class="badge">' + MGrid.getTime(dataList[i].artCreatetiem)+'</span></li>';
						
						var artImage = "${path }/resource/images/nullImg.jpg";
						if(dataList[i].artImage) {
							artImage = dataList[i].artImage;
						}
						
						html += '<div class="hot_news"><a href="javascript:void(0);" onclick="openDetail('
							+ dataList[i].artId
							+ ')"><h3>' + dataList[i].artTitle + '</h3>'
							+ '<img src="' + artImage + '" alt="' + dataList[i].artTitle + '" height="140" width="250">'
							+ '<span>'+ dataList[i].artAbstract +'</span>'
							+ '<em class="more">了解更多 <var>»</var></em></a></div>';
					});
					$('#newsList').html(html);
				}
			})
			
		});

		function openDetail(id) {
			layer.full(
				layer.open({
					type : 2,
					title : "公告详情",
					area : [ MUI.SIZE_L, '600px' ],
					maxmin : true,
					content : [ '${path}/admin/webArticle/toNewsForm?id=' + id ]
				})
			);
		}
	</script>
</body>
</html>
